<html lang="en" xmlns:th="http://www.thymeleaf.org">
<html>
<head>
    <meta charset="UTF-8">
    <title>我的订单</title>
    <link type="text/css" rel="stylesheet" href="/static/css/style2.css" >
    <script type="text/javascript" src="/static/js/jquery-1.8.3.min.js"></script>
    <link type="text/css" rel="stylesheet" href="/css/style.css" />
    <link th:href="@{/bootstrap-3.3.7-dist/css/bootstrap.min.css}" rel="stylesheet">
    <script type="text/javascript" th:src="@{/webjars/jquery/3.3.1/jquery.js}"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"
            integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa"
            crossorigin="anonymous"></script>
    <style type="text/css">
        h1 {
            text-align: center;
            margin-top: 200px;
        }
    </style>
</head>
<body>

<div id="header">
    <img class="logo_img" alt="" src="/static/img/logo.jpg" >
    <span class="wel_word">我的订单</span>

    <div>
        <span>欢迎<span class="um_span" th:text="${session.shopInfo.name}"></span>网上书城</span>
        <a href="/shop/getOrder">我的订单</a>
        <a href="/shop/shoplogout">注销</a>&nbsp;&nbsp;
        <a href="/shop/bookList">返回</a>
    </div>


</div>

<div id="main">

    <table >
        <tr>
            <td width="40%">订单号</td>
            <td width="10%">金额</td>
            <td width="10%">状态</td>
            <td width="10%">创建时间</td>
            <td width="10%">详情</td>
        </tr>
        <tr th:each="order:${orders}">
            <td th:text="${order.orderId}"></td>
            <td th:text="${order.getPrice()}"></td>
<!--            0未发货，1已发货，2表示已签收-->
            <span th:if="${order.status}==0">
                <td>未发货</td>
            </span>
            <span th:if="${order.status}==1">
                <td>已发货</td>
            </span>
            <span th:if="${order.status}==2">
                <td>已签收</td>
            </span>
            <td th:text="${order.createTime}"></td>
            <td>
                <a th:href="@{/shop/info(id=${order.getOrderId()})}">详情</a>
            </td>
        </tr>
    </table>
    <div class="row">
        <!--分页文字信息  -->
        <div class="col-md-6" id="page_info_area">
            当前<span th:text="${session.pageInfo.pageNum}"></span>页，
            总<span th:text="${session.pageInfo.pages}"></span>页，
            总<span th:text="${session.pageInfo.total}"></span>条记录
        </div>
        <!-- 分页条信息 -->
        <div class="col-md-6" id="page_nav_area">
            <ul class="pagination">
                <li><a th:href="@{/shop/getOrder(pn=${session.pageInfo.getFirstPage()})}">首页</a></li>
                <li><a th:href="@{/shop/getOrder(pn=${session.pageInfo.getPrePage()})}">&laquo;</a></li>
                <li th:each="p : ${session.pageInfo.navigatepageNums}">
                    <a th:text="${p}" th:href="@{/shop/getOrder(pn=${p})}"> </a>
                </li>
                <li><a th:href="@{/shop/getOrder(pn=${session.pageInfo.getLastPage()})}">末页</a></li>
            </ul>
        </div>
    </div>
</div>
</body>
</html>